<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});
/**
  * 后台路由
 **/
//后台登录
//加载登录页面(目录App/Http/Controller/Admin/LoginController.php)
Route::get("admin/login",'admin\LoginController@login');
//执行登陆
Route::get("admin/dologin",'admin\LoginController@doLogin');

//后台路由组
Route::group(['prefix' => 'admin','middleware' => 'AdminMiddleware','namespace' => 'Admin'], function () {

//后台首页(目录App/Http/Controller/Admin/IndexController.php)
Route::get("/",'IndexController@index');
//后台首页分页面info
Route::get("/info",'IndexController@info');
//后台管理员(资源路由)(目录App/Http/Controller/Admin/UserController.php)
Route::resource('user', 'UserController');

//用户管理
//视频分类管理(资源路由)(目录App/Http/Controller/Admin/VtypeController.php)
Route::resource('vtype', 'VtypeController');
//视频管理(资源路由)(目录App/Http/Controller/Admin/VideoController.php)
Route::resource('video', 'VideoController');

//配置管理
//轮播图管理(资源路由)(目录App/Http/Controller/Admin/SlidShowController.php)
Route::resource('slidshow', 'SlidShowController');
//友情链接(资源路由)(目录App/Http/Controller/Admin/BlogRollController.php)
Route::resource('blogroll', 'BlogRollController');
//版权声明

});

/**
  *前台路由
 **/
//用户登录
//用户注册
//网站首页
//列表页
//VIP用户专用
//VIP列表页


